namespace System.Linq.Reactive
{
    class TriggeredObserver<T> : SimpleObserverEx<T>
    {
        public bool Open { get; set; }

        public override void OnNext(T item) { if(Open) base.OnNext(item); }
        public override void OnComplited() { if(Open) base.OnComplited(); }
        public override void OnReset() { if(Open) base.OnReset(); }
        public override void OnException(Exception error) { if(Open) base.OnException(error); }

        public TriggeredObserver(IObserverEx<T> observer) : base(observer) { }
    }
}